//
//  Kylin_ArenaViewController.m
//  01-LotteryBaseFrame
//
//  Created by Kylin on 16/1/4.
//  Copyright © 2016年 kylin. All rights reserved.
//

#import "Kylin_ArenaViewController.h"

@interface Kylin_ArenaViewController ()

@end

@implementation Kylin_ArenaViewController

- (void)loadView{
    UIImageView *bgImageView = [[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds];
    
    bgImageView.image = [UIImage imageNamed:@"NLArenaBackground"];
    
    bgImageView.userInteractionEnabled = YES;
    self.view = bgImageView;
    
}
- (void)viewDidLoad {
    [super viewDidLoad];

    // 设置segment
    UISegmentedControl *segment = [[UISegmentedControl alloc]initWithItems:@[@"篮球",@"足球"]];
    
    // 设置导航条titleView
    self.navigationItem.titleView = segment;
    // 设置字体
    [segment setTitleTextAttributes:@{NSForegroundColorAttributeName :[UIColor whiteColor],
                                      NSFontAttributeName : [UIFont systemFontOfSize:15]
                                      
                                      }forState:UIControlStateNormal];
    // 设置背景图片
    [segment setBackgroundImage:[UIImage imageNamed:@"CPArenaSegmentBG"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    
    // 设置选中时的图片
    [segment setBackgroundImage:[UIImage imageNamed:@"CPArenaSegmentSelectedBG"] forState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
    
    [segment setTintColor:[UIColor colorWithRed:0 green:142/255.0 blue:143/255.0 alpha:0]];
    //默认选中一个
    segment.selectedSegmentIndex = 0;

    

}
@end
